package com.yh520.yh520.service;


import com.yh520.yh520.dao.EmployeeRepository;
import com.yh520.yh520.domin.Employee;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * @author liuhuan
 * @create 2018-07-12 10:13
 **/
@Service
public class EmployeeService {
    @Autowired
    private EmployeeRepository employeeRepository;
    public String  save(){
        Employee employee = new Employee();
        employee.setAge("23");
        employee.setName("这就是张三");
        employee.setDate(new Date( ));
        employeeRepository.save(employee);

        return "推送成功!修改了shell脚本";
    }

    public static void main(String[] args) {
//        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
//        System.out.println(df.format(new Date));// new Date()为获取当前系统时间
    }

}
